import request from '@/utils/request'

//export表示可以被别人调用
export default {

  //分页查询讲师列表
  pageTeacherCondition(current,limit,teacherQuery) {
    return request({
      //url: '/eduservice/edu/pageTeacherCondition/'+current+"/"+limit,
      url:`/eduservice/teacher/pageTeacherCondition/${current}/${limit}`,
      method: 'post',
      //data标识把对象转json传输
      data: teacherQuery
    })
  },
  //根据id删除讲师
  removeById(teacherId) {
    return request({
      url: `/eduservice/teacher/deleteById/${teacherId}`,
      method: 'delete'
    })
  },
  //新增讲师
  save(teacher) {
    return request({
      url: `/eduservice/teacher/addTeacher`,
    method: 'post',
    data: teacher
  })
  },
  //根据id查询讲师
  getTeacherById(id) {
    return request({
      url: `/eduservice/teacher/getTeacherById/${id}`,
      method: 'get'
    })
  },

  //根据id修改讲师
  updateTeacherById(teacher) {
    return request({
      url: `/eduservice/teacher/updateTeacherById`,
      method: 'post',
      data: teacher
    })
  },
  //查询所有讲师
  findAll() {
    return request({
      url: `/eduservice/teacher/findAll`,
      method: 'get',
    })
  },

}
